<div id="modal-code" class="modal-660 modal hide">
    <div class="modal-header modal-code-header">
        <button data-dismiss="modal" class="close" type="button">×</button>
        <h3>生成充值码</h3>
    </div>
    <div class="modal-body modal-code-body">
        <form class="form-horizontal text-height-27-form create-code-form" method="post" action="">
            <input type="hidden" name="rec_card_id" value="">
            <div class="control-group">
                <label class="control-label">生成数量</label>
                <div class="controls">
                    <input type="text" name="number" value="" class="number-only text-width-30" maxlength="2">
                    <span class="help-block">* 一次性生成充值码的数量，最多50个！！！</span>
                </div>
            </div>
        </form>
    </div>
    <div class="modal-footer modal-code-footer">
        <a class="btn btn-success confirm ajax-post" url="{:U('RechargeCard/createCode')}" data-ing-html="充值码生成中...，请稍后！" target-form="create-code-form">确定</a>
        <a data-dismiss="modal" class="btn" href="javascript:void(0)">取消</a>
    </div>
</div>
<script>
    function openCodeModal(obj) {
        $('input[name="rec_card_id"]').val($(obj).attr('data-id'));
    }
</script>